'use strict';

const Controller = require('egg').Controller;

class NoticeController extends Controller {
    async notice() {
        try {
            const result = await this.ctx.service.notice.notice()
            console.log(result);
            this.ctx.body = {
                code: 200,
                data: result,
                msg: "查看公告成功"
            }
        } catch (error) {
            this.ctx.body = {
                code: -1,
                data: error,
                msg: "查看公告失败"
            }
        }

    }
}

module.exports = NoticeController;